home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6009 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  35 lines

  1. Newsgroups: comp.lang.c
  2. Path: mxsld2.pd.infn.it!LORETI
  3. From: loreti@mxsld2.pd.infn.it (Maurizio Loreti)
  4. Subject: Re: What's your compiler's answer?
  5. X-Nntp-Posting-Host: mxsld2.pd.infn.it
  6. Message-ID: <Dn64sE.JBr@news.cern.ch>
  7. Sender: news@news.cern.ch (USENET News System)
  8. Reply-To: loreti@mxsld2.pd.infn.it
  9. Organization: I.N.F.N. Padova - CDF/CMS VAXcluster
  10. References: <1996Feb7.140945.28351@cs.rit.edu> <4fq0cq$h9s@hpbblb.bbn.hp.com> <danpop.824432113@rscernix>,<4g2a1d$r33@solutions.solon.com>
  11. Date: Thu, 22 Feb 1996 08:26:36 GMT
  12.  
  13. In article <danpop.824432113@rscernix>, Dan Pop <danpop@mail.cern.ch> wrote:
  14. >j = i++, i++, i++;     /* equivalent to: j = i + 2; i += 3; */
  15.  
  16. cmssun1-15> cat foo.c
  17. #include <stdio.h>
  18.  
  19. main()
  20. {
  21.   int i=3, j;
  22.   j=i++,i++,i++;
  23.   printf("i,j=%d %d\n",i,j);
  24.   return 0;
  25. }
  26. cmssun1-16> gcc -ansi -pedantic -Wall foo.c
  27. foo.c:4: warning: return-type defaults to `int'
  28. cmssun1-17> ./a.out
  29. i,j=6 3
  30.  
  31. Dan????
  32. --
  33. Maurizio Loreti                       http://mvxpd5.pd.infn.it/wwwcdf/mlo.html
  34. Un. of Padova, Dept. of Physics - Padova, Italy          loreti@padova.infn.it
  35.